#include<stdio.h>
#include<unistd.h>
#include"jindutiao.h"

double total=1024.0;
double speed=1.0;
typedef void (*callback)(double total,double current);
void Download(callback cp)
{
  double current=0;
  while(current <= total)
  {
    cp(total,current);
    usleep(3000);
    current+=speed;
  }
  printf("\ndownload %.2lfMB Done\n",current);
}

//int main()
{
  Download(process1);
  return 0;
}
